package com.qiangesoft.im.pojo.dto.query;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 分页参数
 *
 * @author qiangesoft
 * @date 2023-04-06
 */
@ApiModel(value = "分页参数")
@Data
public class PageQueryDTO {

    @ApiModelProperty(value ="页码")
    @NotNull(message = "页码不能为空")
    @Min(value = 1, message = "页码最小值为1")
    private Integer pageNum = 1;

    @ApiModelProperty(value ="条数")
    @NotNull(message = "条数不能为空")
    @Min(value = 1, message = "条数最小值为1")
    @Max(value = 100, message = "条数最大值为100")
    private Integer pageSize = 10;
}
